package com.itheima.d1_algorithm.CaseTest;

import java.util.Arrays;

/**
 * @ClassName XuanZe
 * @Author 16799
 * @Date 2025/7/21 15:34
 * @Version 1.0
 * @Description TODO
 **/
public class XuanZe {
    public static void main(String[] args) {
        int arr[] = {12,43,2,77,32,1};
        for (int i = 0; i < arr.length-1; i++) {
            for (int j = i+1;j < arr.length;j++){
                if (arr[i] > arr[j]){
                    int temp = arr[i];
                    arr[i] = arr[j];
                    arr[j] = temp;
                }
            }
        }
        System.out.println(Arrays.toString(arr));

    }
}
